<html>
	<head>
		<meta charset="UTF-8">
		<title>EdgexFoundry后台管理系统</title>
		<link href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
		<link href="/statics/css/style.css" rel="stylesheet" >
		<script src="/statics/scripts/showdown.js"></script>
	</head>

<!-- 	<style>
		body {
		  font-family: "Helvetica Neue", Helvetica, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif;
		 font-size: 16px;
		  line-height: 1.42857143;
		  color: #333;
		  background-color: #fff;
		}
		ul li {
			line-height: 24px;
		}
		blockquote {
			border-left:#eee solid 5px;
			padding-left:20px;
		}
		code {
			color:#D34B62;
			background: #F9F2F4;
		}
	</style> -->
<body>

<div id="wrapper" class="toggled">

    <!-- 边栏sidebar -->
	<nav class="navbar navbar-inverse navbar-fixed-top" id="sidebar-wrapper" role="navigation">
		<ul class="nav sidebar-nav">
			<li class="sidebar-brand">
				<a href="#">后台管理</a>
			</li>
			<li>
				<a href="/articles/0/10"><i class="fa fa-fw fa-list-alt"></i> 文章管理</a>
			</li>

			<li>
				<a href="/sell/seller/order/list"><i class="fa fa-fw fa-list-alt"></i> 用户管理</a>
			</li>

			<li class="dropdown open">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
					<i class="fa fa-fw fa-plus"></i> 类目管理 <span class="caret"></span>
				</a>
				<ul class="dropdown-menu" role="menu">
					<li class="dropdown-header">&nbsp;&nbsp;&nbsp;操作</li>
					<li><a href="/sell/seller/category/list">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;列表</a></li>
					<li><a href="/sell/seller/category/index">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新增</a></li>
				</ul>
			</li>

			<li>
				<a href="/user/logout/{{.UserName}}"><i class="fa fa-fw fa-list-alt"></i> 注销</a>
			</li>
		</ul>
	</nav>

    <!--主要内容content-->
    <div id="page-content-wrapper">
        <div class="container">
            <div class="row clearfix">

				<div>
					<textarea id="content" style="height:500px;width:1000; display: none;"  onkeyup="compile()">{{.Article.Content}}</textarea>
					<input type="button" class="btn btn-default btn-primary" value="原文编辑" onClick="ShowTxt()" />
					<input type="button" class="btn btn-default btn-primary" value="预览" onClick="HiddenTxt()" />				    
					<h1>文章预览</h1>
					<hr />
				    <div id="result">html</div>
				</div>
				<hr />
                <div class="col-md-12 column">
                    <a href="/article/passArticle/{{.Article.Id.Hex}}" type="button" class="btn btn-default btn-primary">通过</a>
                    <a href="/article/rejectArticle/{{.Article.Id.Hex}}" type="button" class="btn btn-default btn-danger">驳回</a>
                </div>
            </div>
        </div>
    </div>

</div>


<script type="text/javascript">
	compile();
	function compile(){
		var text = document.getElementById("content").value;
		var converter = new showdown.Converter();
		var html = converter.makeHtml(text);
		document.getElementById("result").innerHTML = html;
	}
	
	function ShowTxt() {
		document.getElementById("content").style.display="block";
	}
	function HiddenTxt(){
		document.getElementById("content").style.display="none";
	}
</script>


</body>
</html>